Compiling Constraint Handling Rules to Java: A Reconstruction

نویسنده

  • Peter Van Weert
چکیده

In this report, we provide a detailed description of the compilation scheme the K.U.Leuven JCHR system uses to compile CHR to efficient Java code. We start from a relatively straightforward adaptation of the traditional CHR compilation scheme for Prolog, and gradually add all its basic optimizations. Next, we show why this compilation scheme is not suited for compilation to an imperative host language such as Java. We therefore introduce a novel compilation scheme from CHR to Java that uses explicit call stack maintenance and trampoline-style compilation to guarantee that executing recursive CHR programs no longer results in call stack overflows. The empirical evaluation of the improved compilation scheme confirms it is mostly superior to the traditional one.

منابع مشابه

Compiling Constraint Handling Rules into Prolog with Attributed Variables

We introduce the most recent and advanced implementation of constraint handling rules (CHR) in a logic programming language, which improves both on previous implementations (in terms of completeness , exibility and eeciency) and on the principles that should guide such a Prolog implementation consisting of a runtime system and a compiler. The runtime system utilizes attributed variables for the...

متن کامل

Intelligent search strategies based on adaptive Constraint Handling Rules

The most advanced implementation of adaptive constraint processing with Constraint Handling Rules (CHR) allows the application of intelligent search strategies to solve Constraint Satisfaction Problems (CSP). This presentation compares an improved version of conflict-directed backjumping and two variants of dynamic backtracking with respect to chronological backtracking on some of the AIM insta...

متن کامل

University Halle - Wittenberg Institute of Computer Science 22 nd Workshop on ( Constraint ) Logic Programming

The rule-based programming language Constraint Handling Rules (CHR) has been introduced to ease the development and implementation of constraint solvers. Currently, several CHR libraries exist in languages such as Prolog, Haskell and Java. The K.U.Leuven JCHR system is a high-performance integration of Constraint Handling Rules (CHR) and Java. JCHR is currently by far the most efficient impleme...

متن کامل

Adaptive Constraint Handling with CHR in Java

The most advanced implementation of adaptive constraint processing with Constraint Handling Rules (CHR) is introduced in the imperative object-oriented programming language Java. The presented Java implementation consists of a compiler and a run-time system, all implemented in Java. The run-time system implements data structures like sparse bit vectors, logical variables and terms as well as an...

متن کامل

JCHRIDE: An Integrated Development Environment for JCHR

The rule-based programming language Constraint Handling Rules (CHR) has been introduced to ease the development and implementation of constraint solvers. Currently, several CHR libraries exist in languages such as Prolog, Haskell and Java. The K.U.Leuven JCHR system is a high-performance integration of Constraint Handling Rules (CHR) and Java. JCHR is currently by far the most efficient impleme...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

متن کامل
عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2008